//
//  UIButton+Extension.swift
//  新浪微博第一天
//
//  Created by 张志卓 on 15/11/3.
//  Copyright © 2015年 张志卓. All rights reserved.
//

import UIKit
extension UIButton {


    
    convenience init(imageName: String,backImageName: String){
    
    
        self.init()
        
        
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState: UIControlState.Highlighted)
        setBackgroundImage(UIImage(named: backImageName), forState: UIControlState.Normal)
        
        setBackgroundImage(UIImage(named: backImageName + "_highlighted"), forState: UIControlState.Highlighted)
        
        
        sizeToFit()
        
  
    
    
    }


}